package com.tsx.millions.controller;

import com.tsx.millions.service.ActResultLogService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RequestMapping("/excel")
@RestController
public class ExcelController {
    private final ActResultLogService actResultLogService;

    public ExcelController(ActResultLogService actResultLogService) {
        this.actResultLogService = actResultLogService;
    }

    @GetMapping("/export")
    public void export(HttpServletResponse httpServletResponse) throws IOException {
        actResultLogService.export(httpServletResponse);
    }
}
